import React, { useEffect, useState } from 'react'
import http from '../../utils/http'
import { Card } from 'antd-mobile'
function Index() {
  const [data, setData] = useState([])
  async function getDetailData() {
    const result = await http.get("/api/list/detail", {
      params: {
        id: "230000200003050046"
      }
    })
    setData(result.data.data)
  }
  useEffect(() => {
    getDetailData()
  }, [])
  return (
    <div>
      <Card title={data.title}>
        <img src={data.image}></img>
        <p style={{ fontSize: 30, color: "#f00" }}>￥{data.price}</p>
        <span>结束时间:{data.date}</span>
      </Card>
    </div>
  )
}

export default Index